﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace Bingootest1
{
    public partial class Lose : PhoneApplicationPage
    {
        public Lose()
        {
            InitializeComponent();
        }


        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {
            storyboard1.Completed += new EventHandler(MyStoryboard_Completed);
            storyboard1.Begin();
            //base.OnBackKeyPress(e);
        }

        /*
             * Add this function to your code file
             */
        void MyStoryboard_Completed(object sender, EventArgs e)
        {
            NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));
        }
    }


}